<?php
/**
 * Created by PhpStorm.
 * User: toshiba
 * Date: 2015/4/17
 * Time: 18:33
 */

class base extends Activity{
    // 天气接口
    function weatherTask(){
        $public_key='http://open.weather.com.cn/data/?areaid=101010200&type=forecast_f&date='.date("YmdHi").'&appid=9614f2720ea1ab9b';
        $private_key='4edb59_SmartWeatherAPI_51c6563';
        $key=base64_encode(hash_hmac('sha1',$public_key,$private_key,TRUE));
        $url=$public_key."&key=".$key;
        echo Request::get($url,array());
    }
} 